package com.bacga.abctest.util;

import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestClientException;

import java.util.Map;

@Component
public class Get extends HttpClient{

    public ResponseEntity to(String url) throws RestClientException {

        return restTemplate.getForEntity(url,String.class);
    }

    public ResponseEntity to(String url, Map param){
        return restTemplate.getForEntity(url,String.class,param);
    }
}
